package net.wanglu.www.zzz.rule.tense;

import java.util.Collection;
import java.util.HashMap;
import java.util.regex.Pattern;

import net.wanglu.www.zzz.service.se.__SentenceElements;
import net.wanglu.www.zzz.service.se.nsubj._NSubjTuple;
import edu.stanford.nlp.trees.EnglishGrammaticalRelations;
import edu.stanford.nlp.trees.GrammaticalRelation;
import edu.stanford.nlp.trees.TreeGraphNode;
import edu.stanford.nlp.trees.TypedDependency;

public class PresentTense extends _TenseRule {

	Pattern adverbialOfTime = Pattern.compile("\\balways\\b|\\busually\\b|\\bevery morning\\b|\\bevery night\\b|\\bevery evening\\b|\\bevery day\\b|\\bevery week\\b|\\bevery year\\b|\\boften\\b|\\bsometimes\\b|\\boccasionally\\b|\\bfrom time to time\\b|\\btwice a week\\b|\\brarely\\b|\\bseldom\\b|\\bonce a month\\b|\\bhardly\\b|\\bever\\b|\\bnever\\b");
	@Override
	public Object applicable(Object... objects) throws Exception {
		// TODO Auto-generated method stub
		return super.applicable(objects);
	}

	@Override
	public Object deviseRightSolution(Object... objects) throws Exception {
		// TODO Auto-generated method stub
		return super.deviseRightSolution(objects);
	}

	@Override
	public Object examine(Object... objects) throws Exception {
		// TODO Auto-generated method stub
		HashMap<?, ?> preprocessData = (HashMap<?, ?>) objects[0];
		__SentenceElements se = (__SentenceElements) objects[1];
		_NSubjTuple nst = (_NSubjTuple) objects[2];

		Collection<?> tdl = (Collection<?>) preprocessData.get("tdl");
		for( Object obj : tdl) {
			TypedDependency TD = (TypedDependency) obj;
			GrammaticalRelation reln = TD.reln();
			if ( reln.equals(EnglishGrammaticalRelations.TEMPORAL_MODIFIER)) {
				if ( nst.getVerb().equals(TD.gov())) {
					
				}
			}
		}
		return super.examine(objects);
	}

	@Override
	public Object whyItsWrong(Object... objects) throws Exception {
		// TODO Auto-generated method stub		
		return super.whyItsWrong(objects);
	}
}
